﻿// ===============================================================================
// MarkupLocator.cs
// EOS Web Framework - Demo
// ===============================================================================
// Copyright (c) EOS Development Group. All rights reserved.
// ===============================================================================

namespace NewsDemo.Utils
{
    using System;
    using System.Web;
    using EOS.Framework.Web.Mvc;

    public class MarkupLocator : IMarkupLocator
    {
        #region IMarkupLocator Members

        public IMarkup LocateMarkup(Type containerType, IMarkupCache cache)
        {
            return cache.LoadMarkupFromFile(HttpContext.Current.Request.PhysicalApplicationPath + "Templates\\" + containerType.Name + ".tpl.xml", 
                containerType.Name);
        }

        #endregion
    }
}
